package com.kili.file.config.factory.subabstract;


import com.kili.file.config.factory.FactoryBeanWired;
import com.kili.file.service.impl.FileUploadWithOssCloudStorage;
import com.kili.file.service.impl.FileUploadWithS3CloudStorage;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

/**
 * Cloud-processed, non-file uploading other operations for abstract
 *
 * @param
 */
@Slf4j
public abstract class AbstractCloudFactoryBean<T, E> implements FactoryBeanWired<T, E> {

    @Override
    public T runHandler(E e) {
        Objects.requireNonNull(e);
        log.trace("This is core Non-fileUpload business processing");
        return this.coreWithHandler(e);
    }

    protected static FileUploadWithOssCloudStorage fileUploadWithOssCloudStorage = new FileUploadWithOssCloudStorage();

    protected static FileUploadWithS3CloudStorage fileUploadWithS3CloudStorage = new FileUploadWithS3CloudStorage();

    public abstract T coreWithHandler(E e);


}
